/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package main.EntityClassGraph;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import main.KBProcess.Element;
import main.Ontology.ElementOntologySet;

/**
 *
 * @author Isaac Osesina
 */
public class ElementOntologySetVertex extends ElementOntologySet implements Serializable, Cloneable{
    private Set<Element> elementSet;
    
    public ElementOntologySetVertex(ElementOntologySet vertexName) {
        super(vertexName);
        elementSet = new HashSet<Element>();
    }

    public ElementOntologySetVertex(ElementOntologySet vertexName, Element knowledgeBaseDocument) {
        super(vertexName);
        elementSet = new HashSet<Element>();
        elementSet.add(knowledgeBaseDocument);
    }

    @Override
	public String toString() {
        return super.toString() + "---->" + elementSet;
    }

    public Set<Element> getElementSet() {
        return elementSet;
    }

    public boolean containsElement(Element element) {
        return elementSet.contains(element);
    }

    public boolean addElement(Element element) {
        return elementSet.add(element);
    }

    public boolean compareVertex(ElementOntologySetVertex e) {
        return this.equals(e);
    }
    
    

}
